package com.xiong.controller;

import com.xiong.pojo.Course;
import com.xiong.pojo.StudentCourse;

import com.xiong.response.ResultBean;
import com.xiong.service.StudentCourseService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 熊宇
 * @date 2022/4/29 15:58
 * @description
 */
@RestController
@RequestMapping("/studentCourse")
public class StudentCourseController {

    @Autowired
    private StudentCourseService studentCourseService;
    /**
     * 通过学生Id查询学生信息以及所有课程信息
     * @param id
     * @return
     */
    @GetMapping("/selectStudentInfoByStudentId/{id}")
    public ResultBean selectStudentInfoByStudentId(@PathVariable("id") Long id){
        return ResultBean.suc(studentCourseService.selectStudentInfoByStudentId(id));
    }



}
